import request from '@/utils/request'

// 创建景点资料
export function createScenicspot(data) {
  return request({
    url: '/team/scenicspot/create',
    method: 'post',
    data: data
  })
}

// 更新景点资料
export function updateScenicspot(data) {
  return request({
    url: '/team/scenicspot/update',
    method: 'put',
    data: data
  })
}
// 批量更新添加景点资料
export function updateCreateBatch(data) {
  return request({
    url: '/team/scenicspot/updateCreateBatch',
    method: 'put',
    data: data
  })
}


// 删除景点资料
export function deleteScenicspot(id) {
  return request({
    url: '/team/scenicspot/delete?id=' + id,
    method: 'delete'
  })
}

/** 批量删除景点资料 */
export function deleteScenicspotList(ids) {
  return request({
    url: `/team/scenicspot/delete-list?ids=${ids.join(',')}`,
    method: 'delete'
  })
}

// 获得景点资料
export function getScenicspot(id) {
  return request({
    url: '/team/scenicspot/get?id=' + id,
    method: 'get'
  })
}

// 获得景点资料分页
export function getScenicspotPage(params) {
  return request({
    url: '/team/scenicspot/page',
    method: 'get',
    params
  })
}
// 获得景点资料
export function getScenicspotList(params) {
  return request({
    url: '/team/scenicspot/list',
    method: 'get',
    params
  })
}

// 导出景点资料 Excel
export function exportScenicspotExcel(params) {
  return request({
    url: '/team/scenicspot/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}